<?php
	require 'inc/config.php';

	date_default_timezone_set('Asia/Chongqing');

	$action = $_GET['action'];
	$pin = $_GET['pin'];
	$nickname = $_GET['nickname'];
	$device = $_GET['device'];
	$score = $_GET['score'];
	$last = $_GET['last'];

	if ($action === 'update')
    {
		updateScore($pin, $nickname, $device, $score, $last);
    } else if ($action === 'query') {
		queryRinking();
    }
?>